Skip to content

[19.0][FIX] ..import_camt: fix error when node is an empty element#936

Open
NL66278 wants to merge 1 commit intoOCA:19.0from
Therp:19.0-fix-camt-empty-node-text
Open

[19.0][FIX] ..import_camt: fix error when node is an empty element#936
NL66278 wants to merge 1 commit intoOCA:19.0from
Therp:19.0-fix-camt-empty-node-text

Conversation

@NL66278
Copy link
Copy Markdown
Contributor

@NL66278 NL66278 commented Apr 30, 2026

Import would have an exception when encountering <RmtInf><Ustrd /></RmtInf>:

File "/home/odooedprd19/odoo/auto/addons/account_statement_import_camt/wizard/account_statement_import_camt_parser.py", line 60, in parse_transaction_details
self.add_value_from_node(
~~~~~~~~~~~~~~~~~~~~~~~~^
ns,
^^^
...<8 lines>...
join_str="\n",
^^^^^^^^^^^^^^
)
^
File "/home/odooedprd19/odoo/auto/addons/account_statement_import_camt/wizard/account_statement_import_camt_parser.py", line 53, in add_value_from_node
attr_value = join_str.join([x.text for x in found_node])
TypeError: sequence item 0: expected str instance, NoneType found

@OCA-git-bot OCA-git-bot added series:19.0 mod:account_statement_import_camt Module account_statement_import_camt labels Apr 30, 2026
@NL66278 NL66278 force-pushed the 19.0-fix-camt-empty-node-text branch 2 times, most recently from 9272f15 to 2570f44 Compare April 30, 2026 11:32
Import would have an exception when encountering '<RmtInf><Ustrd /></RmtInf>':

  File "/home/odooedprd19/odoo/auto/addons/account_statement_import_camt/wizard/account_statement_import_camt_parser.py", line 60, in parse_transaction_details
    self.add_value_from_node(
    ~~~~~~~~~~~~~~~~~~~~~~~~^
        ns,
        ^^^
    ...<8 lines>...
        join_str="\n",
        ^^^^^^^^^^^^^^
    )
    ^
  File "/home/odooedprd19/odoo/auto/addons/account_statement_import_camt/wizard/account_statement_import_camt_parser.py", line 53, in add_value_from_node
    attr_value = join_str.join([x.text for x in found_node])
TypeError: sequence item 0: expected str instance, NoneType found
@NL66278 NL66278 force-pushed the 19.0-fix-camt-empty-node-text branch from 2570f44 to 5e763e3 Compare April 30, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:account_statement_import_camt Module account_statement_import_camt series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants